#include <stdio.h>
#include <tchar.h>
#include <iostream>

#include "food.h"
#include <time.h>

food::food(void)
{
	f = NULL;
}

food::food(world* w)
{
	srand((int)time(NULL));
	int i,j;
	do
	{
		i = rand()%(MAP_SIZE_WIDTH-2) + 1;
		j = rand()%(MAP_SIZE_HEIGHT-2) + 1;
	} while (w->map[i][j]->gettype() != blank);
	w->map[i][j]->settype(foods);
	f = w->map[i][j];
	//w->map[10][10]->settype(foods);
	//f = w->map[10][10];
}

note* food::getfd()
{
	return f;
}


food::~food(void)
{
}
